
class Person {
    public int age;
    public String name;
    String sex;//默认是default，也叫默认权限

    public void learn() {
        System.out.println("学习");
    }
}

public class Test {

    public static void main(String[] args) {
        Person per = new Person();
        per.name="张三";
        per.age=20;
        System.out.println(per.name);
        System.out.println(per.age);
        per.learn();
    }
}
